<div class="advertising_design rating_new_wrap col-md-12 col-sm-12 col-xs-12 module_left">
    <div class="title_caption_right">
        <h2><span>tin cùng chuyên mục</span></h2>
    </div>
    <div class="row">
        <div class="module_left_inner">
            <?php
            $categories = get_the_category();
            foreach($categories as $category) {
                $args = array( 'posts_per_page' => 3,'post__not_in' => array($post->ID), 'category' => $category->cat_ID ,"orderby" =>"rand");
            }
            $myposts = get_posts( $args );
            foreach ( $myposts as $post ) : setup_postdata( $post ); ?>
            <div class="advertising_design_item col-md-4 col-sm-4 col-xs-12">
                <div class="advertising_design_item_img">
                    <a href="<?php the_permalink()?>" title="<?php the_title()?>">
                        <?php
                        $args=array('alt'=>get_the_title());
                        the_post_thumbnail('full',$args); ?>
                    </a>
                    <div class="meta_date">
                        <span class="n_day"><?php the_time('d')?></span>
                        <span class="n_month"><?php the_time('m')?></span>
                    </div><!-- END META DATE -->
                </div><!-- END AD IMAGES -->
                <div class="advertising_design_item_content">
                    <h3 class="left_title"><a href="<?php the_permalink()?>" title="<?php the_title()?>">
                            <?php
                            $trimtitle = get_the_title();
                            echo $shorttitle = wp_trim_words( $trimtitle, $num_words = 9, $more = '… ' );
                            ?>
                    </a></h3>
                    <p><?php echo get_limit_content(100);?></p>
                    <a class="view_more" href="<?php the_permalink()?>"><span></span>xem thêm</a>
                </div><!-- END AD CONTENT -->
            </div><!-- END AD ITEM -->
            <?php
                endforeach;
                wp_reset_query();
            ?>

        </div>
    </div>
</div>